package cn.gjxblog.core.event.spring.demo2;

import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

@Component
public class MyEventListener{

    @EventListener(value = {ContextRefreshedEvent.class,MyAppEvent.class})
    public void handle(Object o){
        System.out.println(o);
        System.out.println("事件来了");
    }
}
